<!--导航-->
<a class="layui-logo" href="{{ url_for('front.index') }}">
    <img src="{{ g.site.logo or url_for('static', filename='img/logo.png') }}">
</a>
<ul class="layui-nav layui-layout-right">
    <li class="layui-nav-item" id="verTip"></li>
    <li class="layui-nav-item {% if request.endpoint == 'front.index' %}layui-this{% endif %}">
        <a {% if request.endpoint != 'front.index' %} href="{{ url_for('front.index') }}" {% endif %}><i class="saintic-icon saintic-icon-home"></i> 首页</a>
    </li>
    {% if g.signin %}
    <li class="layui-nav-item">
        <a href="javascript:;">
            <img id="avatar" src="{{ g.userinfo.avatar or url_for('static', filename='img/defaultAvatar.png') }}" class="layui-nav-img">
            <cite id="nickname">{{ g.userinfo.nickname or g.userinfo.username }}</cite>
        </a>
        <dl class="layui-nav-child">
            <dd><a {% if request.endpoint != "front.my" %} href="{{ url_for('front.my', _anchor='!profile') }}" {% endif %}><i class="saintic-icon saintic-icon-user"></i> 个人资料</a></dd>
            <dd><a {% if request.endpoint != "front.my" %} href="{{ url_for('front.my', _anchor='!setting') }}" {% endif %}><i class="saintic-icon saintic-icon-setting"></i> 用户设置</a></dd>
            <dd><a {% if request.endpoint != "front.my" %} href="{{ url_for('front.my', _anchor='!picbed') }}" {% endif %}><i class="saintic-icon saintic-icon-user-album"></i> 我的图片</a></dd>
            <dd><a href="{{ url_for('front.feed') }}" target="_blank"><i class="saintic-icon saintic-icon-rss"></i> 我的RSS</a></dd>
            {{ intpl("nav") }}
            {% if g.is_admin %}
            <dd><a href="{{ url_for('front.admin') }}"><i class="saintic-icon saintic-icon-site-manager"></i> 站点管理</a></dd>
            {% endif %}
            <hr class="navbar-divider">
            <dd><a href="{{ url_for('front.logout') }}"><i class="saintic-icon saintic-icon-logoff"></i> 登出</a></dd>
        </dl>
    </li>
    {% else %}
    <li class="layui-nav-item {% if request.endpoint == 'front.login' %}layui-this{% endif %}">
        <a {% if request.endpoint != 'front.login' %} href="{{ url_for('front.login') }}" {% endif %}><i class="saintic-icon saintic-icon-login"></i> 登录</a>
    </li>
    {% if is_true(g.site.register) %}
    <li class="layui-nav-item {% if request.endpoint == 'front.register' %}layui-this{% endif %}">
        <a {% if request.endpoint != 'front.register' %} href="{{ url_for('front.register') }}" {% endif %}><i class="saintic-icon saintic-icon-register"></i> 注册</a>
    </li>
    {% endif %}
    {% endif %}
</ul>